package com.tiger.db.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;

@Data
@TableName(value = "member", autoResultMap = true)
public class Member {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("account")
    private String account;

    @TableField("password")
    private String password;

    @TableField("salt")
    private String salt;

    @TableField("belong")
    private Integer belong;

    @TableField("source")
    private Integer source;

    @TableField("creator_id")
    private Long creatorId;

    @TableField("tenant_id")
    private Long tenantId;

    @TableField("direct_leader")
    private Integer directLeader;

    @TableField("dept_id")
    private Long deptId;

    @TableField("name")
    private String name;

    @TableField("tel")
    private String tel;

    @TableField("can_super")
    private boolean canSuper;

    @TableField(value = "roles", typeHandler = JacksonTypeHandler.class)
    private Long[] roles;

    @TableField("email")
    private String email;

    @TableField("enable")
    private boolean enable;

    @TableField("remark")
    private String remark;

    @TableField("create_time")
    private Long createTime;

    @TableField("update_time")
    private Long updateTime;

    @TableField("last_login_time")
    private Long lastLoginTime;

    @TableField("last_ip")
    private String lastIp;
}